﻿<!-- 
News Framework
(C) Tanzim Saqib. Oct 25, 2010.
http://TanzimSaqib.com | http://newsfx.codeplex.com
-->
    
    <phone:PhoneApplicationPage 
    x:Class="TanzimSaqib.NewsFramework.RssList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" Width="480" Height="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" shell:SystemTray.IsVisible="True" 
    xmlns:fx="clr-namespace:TanzimSaqib.NewsFramework" 
    fx:Command.Attach="Loaded=RssList_Load">

    <UserControl.DataContext>
        <fx:RssListViewModel />
    </UserControl.DataContext>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{Binding BackgroundImageSource}">

        <!--Pivot Control-->
        <controls:Pivot>
            <controls:Pivot.Title>
                <StackPanel Orientation="Horizontal">
                    <Image x:Name="icon" Source="/ApplicationIcon.png" Height="25" Width="25" Margin="0,0,10,0"/>
                    <TextBlock Text="{Binding PageTitle}" FontStyle="Italic" FontFamily="Segoe WP Bold" FontSize="20" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:Pivot.Title>

            <!--Pivot item one-->
            <controls:PivotItem>
                <controls:PivotItem.Header>
                    <TextBlock FontFamily="Segoe WP Semibold"  FontSize="40" VerticalAlignment="Center" Text="{Binding FeedTitle}"/>
                </controls:PivotItem.Header>
                <ListBox ItemsSource="{Binding FeedItems}" fx:Command.Attach="SelectionChanged=FeedItems_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="0,0,0,30" Width="450">
                                <!--Replace rectangle with image-->
                                <Image Source="{Binding LineTwo}" Height="100" Width="100" />
                                <!-- <Rectangle Height="100" Width="100" Fill="#FFE5001b" /> -->
                                <StackPanel Width="370">
                                    <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"/>
                                </StackPanel>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

</phone:PhoneApplicationPage>